package fiscal;

// Generated 10/07/2009 10:49:54 by Hibernate Tools 3.2.0.b9

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * MarcaModelo generated by hbm2java
 */
@Entity
@Table(name = "TBMARCA_MODELO")
public class FiscalMarcaModelo implements java.io.Serializable {

	private Long id;
	private String nome;
	private String descricao;
	private List<FiscalVeiculo> veiculos = new ArrayList<FiscalVeiculo>(0);

	public FiscalMarcaModelo() {
	}

	public FiscalMarcaModelo(Long id, String nome) {
		this.id = id;
		this.nome = nome;
	}

	public FiscalMarcaModelo(Long id, String nome, String descricao, List<FiscalVeiculo> veiculos) {
		this.id = id;
		this.nome = nome;
		this.descricao = descricao;
		this.veiculos = veiculos;
	}

	@Id
	@SequenceGenerator(name = "CCO_SEQ", sequenceName = "CCO_SEQ", allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CCO_SEQ") 
	@Column(name = "MARCA_MODELO_ID", unique = true, nullable = false, precision = 38, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "NOME", nullable = false, length = 50)
	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	@Column(name = "DESCRICAO", length = 100)
	public String getDescricao() {
		return this.descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "marcaModelo")
	public List<FiscalVeiculo> getVeiculos() {
		return this.veiculos;
	}

	public void setVeiculos(List<FiscalVeiculo> veiculos) {
		this.veiculos = veiculos;
	}

	// The following is extra code specified in the hbm.xml files
	private static final long serialVersionUID = 1L;
	// end of extra code specified in the hbm.xml files

}
